﻿@model UALSender.Web.Models.UserProfile
@using UALSender.Web.Helpers 
@{
    int rowNumber = (int)ViewData[Model.ProfileId + "RowNumber"];
}
<tr>
    @Html.Hidden(string.Format("profiles[{0}].Id", rowNumber), Model.Id)
    <td>
        @Html.Label(string.Format("profiles[{0}].ProfileId", rowNumber), Model.ProfileId)
        @Html.Hidden(string.Format("profiles[{0}].ProfileId", rowNumber), Model.ProfileId)
    </td>
    <td>
        @Html.Label(string.Format("profiles[{0}].Name", rowNumber), Model.Name)
        @Html.Hidden(string.Format("profiles[{0}].Name", rowNumber), Model.Name)
    </td>
    <td>
        @Html.Password(string.Format("profiles[{0}].Password", rowNumber), Model.Password, new { @class = "profilePassword" })
        <br />
        <a class="allPassword" href="#">same for all</a>
    </td>
    <td>@Html.TextBox(string.Format("profiles[{0}].MinAge", rowNumber), Model.MinAge, new { @class = "shortInput" })
    </td>
    <td>@Html.TextBox(string.Format("profiles[{0}].MaxAge", rowNumber), Model.MaxAge, new { @class = "shortInput" })
    </td>
    <td>
        @Html.AdminsDropdownList(string.Format("profiles[{0}].IntroSender", rowNumber), "introsender", Model.IntroSender)
        <br />
        <a class="allIntro" href="#">same for all</a>
    </td>
    <td>
        @Html.AdminsDropdownList(string.Format("profiles[{0}].WinksSender", rowNumber), "winkssender", Model.WinksSender)
        <br />
        <a class="allWinks" href="#">same for all</a>
    </td>
    <td>
        @Html.SearchTypes(string.Format("profiles[{0}].SearchType", rowNumber), "searchtypes", Model.SearchType)
        <br />
        <a class="allSearchType" href="#">same for all</a>
    </td>
    <td>
        @Html.TextBox(string.Format("profiles[{0}].SendingLimit", rowNumber), Model.SendingLimit, new { @class = "sendinglimit" })
        <br />
        <a class="allLimit" href="#">same for all</a>
    </td>
    <td>
        @Html.Videos(string.Format("profiles[{0}].VideoIntro", rowNumber), "mailTemplates", Model)
    </td>
    <td>
        @Html.CheckBox(string.Format("profiles[{0}].SendVideo", rowNumber), Model.SendVideo, new Dictionary<string, object>() { { "class", "sendvideo" } })
        <br />
        <a class="allVideo" href="#">same for all</a>
    </td>
    <td>
        @Html.LocationsDropdownList(string.Format("profiles[{0}].Location", rowNumber), "location", Model.Location)
        <br />
        <a class="allLocation" href="#">same for all</a>
    </td>
    <td>
        <div>
            @Html.CheckBox(string.Format("profiles[{0}].IsMarked", rowNumber), Model.IsMarked, new Dictionary<string, object>() { { "class", "marksend" } })
        </div>
        <div>
            <span class="sendingProgress" id="@string.Format("sending_status_{0}", Model.ProfileId)">
                Now sending </span>
        </div>
    </td>
    <td>
        @Html.ProfileSendAllButton(Model.ProfileId)
    </td>
    @Html.Hidden(string.Format("profiles[{0}].Available", rowNumber), Model.Available)
</tr>
